<!--
 * @Author: 詹真琦(legendryztachi@gmail.com)
 * @Date: 2021-11-25 17:17:58
 * @LastEditors: 詹真琦(legendryztachi@gmail.com)
 * @LastEditTime: 2022-01-13 17:31:30
 * @FilePath: \code\cwp-front\pc-collaboration\src\components\global\scroll\index.vue
 * @Description: 滚动组件
-->
<template>
    <vuescroll :ops="mergeOptions"><slot></slot></vuescroll>
</template>
<script>
    import vuescroll from 'vuescroll/dist/vuescroll-native';
    export default {
        name: 'Scroll',
        components: { vuescroll },
        props: {
            options: {
                type: Object,
                default: () => ({}),
            },
        },
        computed: {
            mergeOptions() {
                return Object.assign(
                    {
                        bar: {
                            background: 'rgba(0,0,0,.2)',
                            onlyShowBarOnScroll: false,
                        },
                    },
                    this.options
                );
            },
        },
    };
</script>
<style lang="scss" scoped></style>
